home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TPUG - Toronto PET Users Group
/
TPUG Users Group CD
/
TPUG Users Group CD.iso
/
AMIGA
/
AMICUS
/
AMICUS04.ADF
/
image.ed
/
saveform.h
< prev
next >
Wrap
C/C++ Source or Header
|
1985-10-26
|
3KB
|
59 lines
/************* saveformat.h **************/
/* this is the format of the data for the Image.Editor, both save and
* load.... it has some versatility to it in that the size of the
* data structure is flexible
*/
struct saveformat {
ULONG next; /* how many BYTES from start is another
* block of data just like this one.
* If == 0, then no more blocks follow */
ULONG colorset; /* How many BYTES from start of struct is
* table containing the colors used for
* the image editing?
*/
ULONG dataset; /* How many BYTES from start of struct is
* table containing the planes of data?
*/
ULONG depth; /* Defines how many colors (power-of-two)
* are in the color table, (if depth = 2,
* there are 4 colors, 3->8, 4->16, 5->32
* as well as how many planes of data per
* image.
*/
ULONG width; /* bitwidth of the image */
ULONG height; /* lineheight of the image */
UWORD datastart;/* data starts here */
};
/* Format can be used to save color only, data only, or color and data.
* Convention used: If saveformat.colorset == 0, then no colors stored.
* If saveformat.dataset == 0, then no data stored.
* If both nonzero, and if this file read into a
* large contiguous buffer, you find tables
* by the technique:
*
* struct saveformat *s;
* UWORD buffer[1000];
* UWORD *b;
* UWORD *colordata;
* UWORD *imagedata;
*
* b = &buffer[0];
* s = b;
* if(s->colorset != 0)
* colordata = b + s->colorset;
* else
* colordata = NULL;
* if(s->dataset != 0)
* imagedata = b + s->dataset;
* else
* imagedata = NULL;
*
*
*********** Rob Peck 6/20/85 ***************************************** */